package com.summer.order.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.summer.user.model.User;

@Entity
@Table(name = "order_detail")
public class OrderDetail implements Serializable{

	
	
	private static final long serialVersionUID = -7634437824048480009L;

	private String id;
	
	private User user;
	
	private Cookbook cookbook;
	
	private UserOrder userOrder;
	
	private String breakfastDetail;
	
	private String lunchDetail;

	@Id
	@Column(name = "id" , unique = true , nullable = false)
	public String getId() {
		return id;
	}

	@ManyToOne
	@JoinColumn(name = "user_id")
	public User getUser() {
		return user;
	}

	@ManyToOne
	@JoinColumn(name = "user_order_id")
	public UserOrder getUserOrder() {
		return userOrder;
	}

	@Column(name = "breakfastdetail")
	public String getBreakfastDetail() {
		return breakfastDetail;
	}

	@Column(name = "lunchdetail")
	public String getLunchDetail() {
		return lunchDetail;
	}
	
	@ManyToOne
	@JoinColumn(name = "cookbook_id")
	public Cookbook getCookbook() {
		return this.cookbook;
	}

	public void setId(String id) {
		this.id = id;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public void setUserOrder(UserOrder userOrder) {
		this.userOrder = userOrder;
	}

	public void setBreakfastDetail(String breakfastDetail) {
		this.breakfastDetail = breakfastDetail;
	}

	public void setLunchDetail(String lunchDetail) {
		this.lunchDetail = lunchDetail;
	}
	
	public void setCookbook(Cookbook cookbook) {
		this.cookbook = cookbook;
	}
	
	
	
}
